package cn.song.service;

public class AsyncService {
    public String testMethod1(){
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("我是异步方法1");
        return "1";
    }
    public String testMethod2(){
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("我是异步方法2");
        return "2";
    }
    public String testMethod3(){
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("我是异步方法3");
        return "3";
    }
    public String testMethod4(){
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("我是异步方法4");
        return "4";
    }

    public String testMethod5(String n){
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("我是异步方法"+n);
        return n;
    }
}
